﻿using System;
using System.Collections.Generic;
using System.Text;
using BF.Model;
using BF.Infrastructure;
using System.Linq.Expressions;

namespace BF.IBLL.BaseSystem
{
    public interface Isys_UserInfoBLL
    {
        bool Add(sys_UserInfo entity, List<String> roles, bool isapproved);
        List<Guid> GetUserIdByRoles(Guid roleid);
        bool Delete(sys_UserInfo entity);
        bool Delete(System.Linq.Expressions.Expression<Func<Model.sys_UserInfo, bool>> predicate);
        bool Delete(System.Linq.Expressions.Expression<Func<Model.sys_UserInfo, bool>> predicate, string sLoginName, Guid gUserId);
        sys_UserInfo GetModelByloginname(string name);
        List<sys_UserInfo> GetList(Expression<Func<Model.sys_UserInfo, bool>> where, Expression<Func<sys_UserInfo, object>> orderBy, PageModel pageModel, bool isAscending);
        int GetRowCount(Expression<Func<sys_UserInfo, bool>> where);
        List<sys_UserInfo> GetList(Expression<Func<Model.sys_UserInfo, bool>> where);
        sys_UserInfo GetModelByPK(Guid gUserID);
        bool Update(sys_UserInfo entity, List<String> roles, bool isapproved);
        List<sys_UserInfo> GetListByRole(string roleName, Expression<Func<Model.sys_UserInfo, bool>> where);
        bool Update();
        bool ChangeState(Guid gUserID, bool iState);

        int GetViewRowCount(Expression<Func<View_SysUserInfo, bool>> where);
        List<View_SysUserInfo> GetViewList(Expression<Func<Model.View_SysUserInfo, bool>> where, Expression<Func<View_SysUserInfo, object>> orderBy, PageModel pageModel, bool isAscending);
        List<View_SysUserInfo> GetViewList(Expression<Func<Model.View_SysUserInfo, bool>> where);
        bool ModifyUserRoles(List<Guid> UserList, List<string> RolesList);
    }
}
